/**
 * Created:	
 * By:		eeorange
 * OS:		Windows/mingw
 * Ques ID:	
 * Status:	
 * Desc: 
 *
 */
#ifdef ONLINE_JUDGE
	#define NDEBUG
#endif
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;

void gcd(int a, int b, int& x, int& y)
{
	if(!b){ x = 1; y = 0; }
	else{
		gcd(b, a%b, y, x); y -= x*(a/b);
	}
}

int main(){
	#ifndef ONLINE_JUDGE
		freopen("data.in", "r", stdin);
	#endif

	
	int x, y;
	gcd(12, 9, x, y);
	printf("%d %d\n", x, y);


	#ifndef ONLINE_JUDGE
		printf("Time used = %.3lf\n", (double)clock()/CLOCKS_PER_SEC);
	#endif
	return 0;
}

